package com.niiwoo.activity.stage.enums.prize;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author zq
 * @Date 2017/11/25
 */
@Getter
@AllArgsConstructor
public enum UserPrizeSuitProjectTypeEnum {

    // 适用标的类型(说明：0：不限类型、1：信用借、2：悄悄借、3：消费借、4：极速借（个人）、5：卡贷，可多选，例如：“1,2”或者“2,4”等）
    //小易贷，社保贷，信用卡贷,消费贷
    FORBID(-1, "禁止使用红包"),

    //NONE(0,"不限类型"),
    CREDIT(1, "信用借"),
    QQJ(2, "悄悄借"),
    CONSUMER(3, "消费借"),
    SPEED(4, "极速借（个人）"),
    CARD(5, "卡贷"),
    LITTLE_CREDIT(6, "小易贷"),
    SOCIAL_SECURITY(7, "社保贷"),
    CREDIT_CARD(8, "信用卡贷"),
    HONGTE(9, "房抵贷"),
    PACKAGE_INVEST(10, "智能投"),
    CONSUME_LOAN(11, "消费贷"),
    BUSINESS_LOAN(12, "生意贷"),
    SALARY_LOAN(13,"薪金贷")
    ;
    private Integer type;

    private String desc;

    public static UserPrizeSuitProjectTypeEnum getTypeEnum(Integer type) {
        for (UserPrizeSuitProjectTypeEnum typeId : values()) {
            if (typeId.getType().equals(type)) {
                return typeId;
            }
        }
        return null;
    }

}